<?php
//ini_set('magic_quotes_gpc',1);
//ini_set('display_errors',On);
define('IN_DISCUZ', '1');
require_once("collect_base.php");
require_once("collect_tongyong.php");
require_once(APP_PATH . "/Common/yzs1013_pldr.php");
//require_once("zqnews.class.php");
$_GET['gather_type'] = $_GET['gather_type'] ?? "";
if($_GET) {
    $_GET['doclre']=$_GET['doclre']??"";
    $_GET['b1']=$_GET['b1']??"";
}
if($_POST) {
    $_POST['gather_type']=$_POST['gather_type']??"";
}


if ($_GET['doclre'] == 1) {
    print_r(trim(jcre($_POST['sdata'])));
    exit;
}

$_GET['doclchangurl']=$_GET['doclchangurl']??"";
if ($_GET['doclchangurl'] == 1) {
    $s=$_POST['sdata'];
    $s="$this->changeurl(\"{$s}\");";
    print_r($s);
    exit;
}

if ($_GET['doclre'] == 2) {
    print_r("preg_match_all(\"/" . trim(jcre($_POST['sdata'])) . "/Uisx\",\$nr,\$nn);\nfor(\$i=0;\$i<count(\$nn[1]);\$i++){\n            echo trim(\$nn[1][\$i]).\":\".trim(\$nn[2][\$i]).\"\\r\\n\";\n        }");
    exit;
}


if ($_POST) {
    $_POST['url']=$_POST['url']??"";
    $_POST['gather_type']=$_POST['gather_type']??"";
    $url = $_POST['url'];
    $gather_type = $_POST['gather_type'];
} else {
    $url = $_GET['url'];
    $gather_type = $_GET['gather_type'];
}

if (preg_match("/s=1/Uisx", $url)) {
    $ywj = curl3($url);
}
$host = host($url);
$curlfilepath="../Lib/CollcetLib/{$host}.curl.php";

$t = new t($config['DB_HOST'], $config['DB_USER'], $config['DB_PWD'], $config['DB_NAME']);

if ($_POST && $_GET['b1']) {
    $re = jcre($_POST['re']);
    $pq=$_POST['pq'];
    $hrefbtpq=$_POST['hrefbtpq'];
    $_POST['nrzq']=$_POST['nrzq']??"";
    $nrzq=(is_array($_POST['nrzq']))?join(",",$_POST['nrzq']):"";
    $_POST['listzq']=$_POST['listzq']??"";
    $listzq=(is_array($_POST['listzq']))?join(",",$_POST['listzq']):"";
    $elementre=$_POST['elementre'];
    $titlere = jcre($_POST['titlere']);
    $title2re = jcre($_POST['title2re']);
    $title3re = jcre($_POST['title3re']);
    $hrefbtre = jcre($_POST['hrefbtre']);
    $resourcesre = jcre($_POST['resourcesre']);
    $datelinere = jcre($_POST['datelinere']);
    $repliesre = jcre($_POST['repliesre']);
    $authorre = jcre($_POST['authorre']);
    $jizhere = jcre($_POST['jizhere']);
    $platere = jcre($_POST['platere']);
    $viewsre = jcre($_POST['viewsre']);
    $keyword = jcre($_POST['keyword']);
    $laiyuanre = jcre($_POST['laiyuanre']);
    $delete = jcre($_POST['delete']);
    $pre_delete = jcre($_POST['pre_delete']);
    $pre_retant = jcre($_POST['pre_retant']);
    $puhuo = $_POST['puhuo'];
    $aviimagere = jcre($_POST['aviimagere']);
    $python = $_POST['python'];
    $aviexe = $_POST['aviexe'];
    $_POST['noautocollectswf']=$_POST['noautocollectswf']??"";
    $noautocollectswf = $_POST['noautocollectswf'];
    $jianjiere = jcre($_POST['jianjiere']);
    $css = $_POST['css'];
    $configs = $_POST['config'];
    $mustformdbpageinfo = $_POST['mustformdbpageinfo'];
    $locationjump = $_POST['locationjump'];
    $loginurl = $_POST['loginurl'];
    $username = $_POST['username'];
    $password = $_POST['password'];
    $loginpassword = $_POST['loginpassword'];
    $loginusername = $_POST['loginusername'];
    $loginbtn = $_POST['loginbtn'];
    $loginedre = $_POST['loginedre'];
    $_POST['isselector']=$_POST['isselector']??"";
    $isselector = $_POST['isselector'];
    $dd = preg_split("/\|\|\||$/m", $_POST['nextpage']);


    if(trim($aviexe)!=""&&trim($aviexe)!="null"){
        $filename="../Lib/CollcetLib/{$host}.inc.php";
        $f=fopen($filename,"w");
        fwrite($f,$aviexe);
        fclose($f);
    }
    if(trim($aviexe)=="null"){
        $filename="../Lib/CollcetLib/{$host}.inc.php";
        unlink($filename);
    }

    $nextpage2 = "";
    for ($j = 0; $j < count($dd); $j++) {
        if (preg_match("/[a-zA-Z0-9_\-\.]+\.(gif|jpg|jpeg|png|bmp)$/Uisx", trim($dd[$j]))) {
            $nextpage2 .= "<img[^<>]+src=[^<>]*" . addsla($dd[$j]) . "[^<>]*>";
        } else {
            $nextpage2 .= "\r\n" . trim($dd[$j]);
        }
    }
    $nextpage = jcre($nextpage2);

    $cookie=preg_replace("/^Cookie\:\s*/","",trim($_POST['cookie']));
    $nn=preg_split("/\s*\;\s*/",$cookie);
    $result="{";
    foreach($nn as $x=>$y){
        $mm=explode("=",$y);
        if(isset($mm[1])) {
            $result .= "\"{$mm[0]}\":\"{$mm[1]}\",";
        }else{
            $result .= "\"{$mm[0]}\":\"\",";
        }
    }
    $cookie_json=substr($result,0,-1)."}";

    $data = array(
        'titlere' => $titlere,
        're' => $re,
        'pq' => $pq,
        'delete' => $delete,
        'titlere' => $titlere,
        'title2re' => $title2re,
        'title3re' => $title3re,
        'hrefbtre' => $hrefbtre,
        'hrefbtpq' => $hrefbtpq,
        'elementre' => $elementre,
        'pre_delete' => $pre_delete,
        'pre_retant' => $pre_retant,
        'exec' => trimbom($_POST['exec']),
        'functions' => $_POST['functions'],
        'preexe' => trimbom($_POST['preexe']),
        'curlfile' => trimbom($_POST['curlfile']),
        'httpheadoption' => $_POST['httpheadoption'],
        'loadimg' => $_POST['loadimg'],
        'swfstrreferer' => $_POST['swfstrreferer'],
        'nextpage' => $nextpage,
        'puhuo' => $puhuo,
        'cookie' => $_POST['cookie'],
        'cookie_json' =>$cookie_json,
        'keyword' => $keyword,
        'host' => $host,
        'refresh' => $_POST['refresh'],
        'getcontenttype' => $_POST['getcontenttype'],
        'updatetime' => date("Y-m-d H:i:s"),
        'authorre' => $authorre,
        'platere' => $platere,
        'authorre' => $authorre,
        'jizhere' => $jizhere,
        'viewsre' => $viewsre,
        'laiyuanre' => $laiyuanre,
        'datelinere' => $datelinere,
        'repliesre' => $repliesre,
        'resourcesre' => $resourcesre,
        'aviimagere' => $aviimagere,
        'noautocollectswf' => $noautocollectswf,
        'python' => trimbom($python),
        'css' => trimbom($css),
        'config' => trimbom($configs),
        'aviexe' => trimbom($aviexe),
        'jianjiere' => trimbom($jianjiere),
        'listresultphp' => trimbom(trimbom($_POST['listresultphp'])),
        'locationjump' => $locationjump,
        'listzq' => $listzq,
        'nrzq' => $nrzq,
        'mustformdbpageinfo' => $_POST['mustformdbpageinfo'],
        'bturl' => $_POST['bturl'],
        'y' => $_POST['y'],
        'p' => $_POST['p'],
        'c' => $_POST['c'],
        'loginurl'=>$_POST['loginurl'],
        'loginusername'=>$_POST['loginusername'],
        'loginpassword'=>$_POST['loginpassword'],
        'loginbtn'=>$_POST['loginbtn'],
        'loginedre'=>$_POST['loginedre'],
        'isselector'=>$_POST['isselector'],
        'prodata'=>$_POST['prodata'],
        'prowebdata'=>$_POST['prowebdata'],
    );

    $where=($_POST['id']!="")?" or id='{$_POST['id']}'":"";
    $data=setrsnull($data);
    $t->rk("longzs_re", "","host='$host' $where", $data, array('insert' => 1, 'key' => 'id', 'autoadd' => 1, 'dataarray' => $data, 'keyarray' => array(), 'qzsxarray' => array(), 'pczd' => 'urlreplace,urlreplace2,urlreplace3', 'orderby' => 'order by gather_type,updatetime desc'));
//    if($data['curlfile']!=""){
//        if($data['curlfile']==null){
//            unlick($curlfilepath);
//        }
//        file_put_contents($curlfilepath,$data['curlfile']);
//    }
    if($_POST['username']!=""&&$_POST['password']!=""){
        $data2['username']=$_POST['username'];
        $data2['password']=trim($_POST['password']);
        $data2['host']=trim($_POST['host']);
        $where=($_POST['id']!="")?" and username='{$_POST['username']}'":"";
        $t->rk("longzs_namepass", "","host='{$_POST['host']}' $where", $data2, array('insert' => 1, 'key' => 'id', 'autoadd' => 1, 'dataarray' => $data2, 'keyarray' => array(), 'qzsxarray' => array(), 'orderby' => 'order by id desc'));
    }
    echo "ok<script>//alert('OK')</script>";
    exit;
}
$sql="select * from longzs_re where host='" . trim(host($url)) . "' order by gather_type,updatetime desc";
$rs = $t->sqlone($sql);// and keyword='".$keyword."'

/*if(file_exists($curlfilepath)) {
    $rs['curlfile'] =file_get_contents($curlfilepath);
}*/
if($rs['nrzq']) {
    $nrzq = explode(",", $rs['nrzq']);
}else{
    $nrzq=array();
}
$listzq=explode(",",$rs['listzq']);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="../../js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" language="javascript" src="../js/layer/layer.js"></script>
    <script type="text/javascript" language="javascript" src="/collect/longsun_collect_set.js"></script>
    <link rel="stylesheet" href="/collect/reset/css/longsun_collect_set.css"/>
</head>

<title>标题结果替换</title>
</head>

<body topmargin="0" leftmargin="0">
<iframe id=ifr name=ifr frameborder=0 width=0 height=0></iframe>
<iframe id=ifr1 name=ifr1 frameborder=0 width=0 height=0></iframe>
<iframe id=ifr2 name=ifr2 frameborder=0 width=0 height=0></iframe>
<iframe id=ifr3 name=ifr3 frameborder=0 width=0 height=0></iframe>
<iframe id=ifr4 name=ifr4 frameborder=0 width=0 height=0></iframe>
<iframe id=ifr5 name=ifr5 frameborder=0 width=0 height=0></iframe>
<iframe id=ifr6 name=ifr6 frameborder=0 width=0 height=0></iframe>
<iframe id=ifr7 name=ifr7 frameborder=0 width=0 height=0></iframe>
<iframe id=ifr8 name=ifr8 frameborder=0 width=0 height=0></iframe>
<div id="htitle"><h1>配置<?= $host ?>网站的采集规则(<span id="hostid"><?= $rs['id'] ?></span> , <span id="cacheid"></span><span id="deletecache" style="font-size:9pt;cursor:pointer">删除</span>)</h1>
<div id="debugurl"><br></div></div>
<div id="peizhi">
<form id="cpform" autocomplete="on" method="post" name="cpform" style="margin:0;padding:0">
    <input type=hidden name="url" id="this_url" value="<?= $_GET['url'] ?>">
    <input type=hidden name="host" id="this_host" value="<?= $host ?>">
    <input type=hidden id="whost" name="whost"
           value="<?= preg_replace("/(http\:\/\/[^\/]+\/).*$/", "\\1", $_GET['url']) ?>">
    <input type=hidden name="gather_type" value="<?= $_GET['gather_type'] ?>">
    <?php if ( $_GET['gather_type'] == 6 || $_GET['gather_type'] == 1) { ?>
    <dd><dl class="title"><span>标题结果替换:</span><span id="tip_subject"></span></dl><dl><textarea name=titlere  ob="subject"  id="pp_subject" onblur=clre(this)  class="history"  style="z-index:0;height:20px"><?= $rs['titlere'] ?></textarea></dl></dd>
    <dd ><dl class="title"><span>引标题:</span><span id="tip_subject2"></span></dl><dl><textarea name=title2re  class="history" ob="subject2"  id="pp_subject2" onblur=clre(this)
                                    style="z-index:1;height:20px"><?= $rs['title2re'] ?></textarea></dl>
    </dd>
    <dd><dl class="title"><span>附标题:</span><span id="tip_subject3"></span></dl><dl><textarea name=title3re class="history" ob="subject3" id="pp_subject3" onblur=clre(this)
                                     style="z-index:2;height:20px"><?= $rs['title3re'] ?></textarea></dl></dd>
    <dd>
        <dl class="title"><span>文章简介</span><span id="tip_jianjie"></span></dl>
        <dl><textarea type="text" id="jianjiere" name="jianjiere" onblur="clre(this)" class="history"  id="pp_cheshi"  ob="jianjie"><?= $rs['jianjiere'] ?></textarea></dl>
    </dd>
    <dd><dl class="title"><span>内容匹配正则:</span>
            <input type="checkbox" name="nrzq[]" value="1" id="nrzq1"<?if(in_array(1,$nrzq)) echo " checked";?>><label for="nrzq1">无cookie</label>
            <input type="checkbox" name="nrzq[]" value="2" id="nrzq2"<?if(in_array(2,$nrzq)) echo " checked";?>><label for="nrzq2">无refrere</label>
            <input type="checkbox" name="nrzq[]" value="3" id="nrzq3"<?if(in_array(3,$nrzq)) echo " checked";?>><label for="nrzq3">进loclhref</label>
            <input type="checkbox" name="nrzq[]" value="4" id="nrzq4"<?if(in_array(4,$nrzq)) echo " checked";?>><label for="nrzq4">GBK编码</label>
            <input type="checkbox" name="nrzq[]" value="5" id="nrzq5"<?if(in_array(5,$nrzq)) echo " checked";?>><label for="nrzq5">curlbase</label>
            <input type="checkbox" name="nrzq[]" value="6" id="nrzq6"<?if(in_array(6,$nrzq)) echo " checked";?>><label for="nrzq6">element</label>
            <input type="checkbox" name="nrzq[]" value="7" id="nrzq7"<?if(in_array(7,$nrzq)) echo " checked";?>><label for="nrzq7">href</label>
            <input type="checkbox" name="nrzq[]" value="8" id="nrzq8"<?if(in_array(8,$nrzq)) echo " checked";?>><label for="nrzq8">空两格</label><br>
            <input type="checkbox" name="nrzq[]" value="9" id="nrzq9"<?if(in_array(9,$nrzq)) echo " checked";?>><label for="nrzq9">平段头</label>
            <input type="checkbox" name="nrzq[]" value="10" id="nrzq10" <?if(in_array(10,$nrzq)) echo " checked";?>><label for="nrzq10">flvcd</label>
            <input type="checkbox" name="nrzq[]" value="11" id="nrzq11" <?if(in_array(11,$nrzq)) echo " checked";?>><label for="nrzq11">原样式</label>
            <input type="checkbox" name="noautocollectswf" value="1" id="noautocollectswf" <?if($rs['noautocollectswf']==1) echo " checked";?>><label for="noautocollectswf">非首视频</label>

            <a href="javascript:void()"  onclick="help('nr')" class="titleright" id="nrhelp">帮助</a>
            <textarea  name=re  class="history" ob="swf" id="pp_message2" onblur=clre(this)  class="history"><?= cn2utf8($rs['re']) ?></textarea></dl>
    </dd>
    <dd><dl class="title"><span>内容PQ:</span><a href="javascript:void()"  onclick="help('nrpq')" id="nrpqhelp">帮助</a>
            <span class="right"><a href="javascript:void()" onclick="pqtext()" id="jsdata_tis">pq()-></a></span></dl><dl><textarea  name=pq   class="history" ob="message"  id="pq" ><?= cn2utf8($rs['pq']) ?></textarea></dl></dd>
    <? } ?>
    <dd><dl class="title">图片无法显示时选:</dl><dl>
            <input class="acharw" name=loadimg value="<?= $rs['loadimg'] ?>">
            <input class="acharw"  name=refresh value="<?= $rs['refresh'] ?>">
            <input class="acharw"  name=c        value="<?= $rs['c'] ?>"></dl></dd>
    <?php if ($_GET['gather_type'] == 6 || $_GET['gather_type'] == 1) { ?>
        <dd><dl class="title"><span>列表页匹配正则:</span>
            <input type="checkbox" name="listzq[]" value="1" id="lizq1"<?if(in_array(1,$listzq)) echo " checked";?>><label for="lizq1">无cookie</label>
            <input type="checkbox" name="listzq[]" value="2" id="lizq2"<?if(in_array(2,$listzq)) echo " checked";?>><label for="lizq2">无refrere</label>
            <input type="checkbox" name="listzq[]" value="3" id="lizq3"<?if(in_array(3,$listzq)) echo " checked";?>><label for="lizq3">进loclhref</label>
            <input type="checkbox" name="listzq[]" value="4" id="lizq4"<?if(in_array(4,$listzq)) echo " checked";?>><label for="lizq4">GBK编码</label>
            <input type="checkbox" name="listzq[]" value="5" id="lizq5"<?if(in_array(5,$listzq)) echo " checked";?>><label for="lizq5">curlbase</label>
            <input type="checkbox" name="listzq[]" value="6" id="lizq6"<?if(in_array(6,$listzq)) echo " checked";?>><label for="lizq6">element</label>
            <input type="checkbox" name="listzq[]" value="14" id="lizq14"<?if(in_array(14,$listzq)) echo " checked";?>><label for="lizq14">无css分析</label>
                <span class="right"> <a href="javascript:void(0)" onclick="zcgj('nn22')">nn22</a></span>
            <span class="right"> <a href="javascript:void(0)" onclick="zcgj('clre')">clre</a></span>
                <a href="javascript:void()"  onclick="help('lbre')" id="lbrehelp">帮助</a>
            </dl><dl>
                <textarea id="hrefbtre" name=hrefbtre onblur=clre(this) class="history"><?= cn2utf8($rs['hrefbtre']) ?></textarea></dl></dd>
    <dd><dl class="title">列表页PQ:<a href="javascript:void()"  onclick="help('lbpq')" id="lbpqhelp">帮助</a>
            <a href="javascript:void()" target="_blank" class="right" id="cache_before">前缓存</a>
            <a href="javascript:void()" target="_blank" class="right"  id="cache_after">后缓存</a>
        </dl><dl><textarea  name="hrefbtpq"  class="history"><?= cn2utf8($rs['hrefbtpq']) ?></textarea></dl></dd>
    <? } ?>
    <dd id="proWin"><dl class="title"><span>专业数据：</span><span id="tip_jsonHost"><input type="checkbox" id="isselector" name="isselector" value="1" <?if($rs['isselector']>0) echo " checked";?> >是否selector</span><span id="elementinfo"></span><span class="right"><a href="javascript:void()"  onclick="help('selector')">帮助</a></span></dl><dl>
            <textarea  name="prodata"  class="height_suoxiao" ob="jsonHost" id="prodata" ><?= $rs['prodata'] ?></textarea>
            <textarea  name="prowebdata"  class="height_suoxiao" id="prowebdata"><?= $rs['prowebdata'] ?></textarea>
        </dl>
    </dd>
    <dd id="eleWin"><dl class="title">Ele正则：<span class="right"><a href="javascript:void()"  onclick="help('ele')" id="ele_tis">帮助</a></span></dl><dl><textarea  name="elementre" style="height:20px"><?= $rs['elementre'] ?></textarea></dl></dd>
    <dd><dl class="title" id="dateline"><span>时间：</span><span id="tip_dateline"></span></dl><dl><textarea  name="datelinere"  class="history" ob="dateline" id="pp_dateline" onblur=clre(this) style="height:20px"><?= $rs['datelinere'] ?></textarea></dl></dd>
    <dd><dl class="title"><span>栏目：</span><span id="tip_plate"></span></dl><dl><textarea  name="platere"  class="history" ob="plate" id="pp_plate" onblur=clre(this) style="height:20px"><?= $rs['platere'] ?></textarea></dl></dd>
    <dd><dl class="title"><span>来源：</span><span id="tip_laiyuan"></span></dl><dl><textarea  name="laiyuanre"  class="history" ob="laiyuan" id="pp_laiyuan"
                                  onblur=clre(this) style="height:20px"><?= $rs['laiyuanre'] ?></textarea></dl></dd>
    <dd><dl class="title"><span>浏览：</span><span id="tip_views"></span></dl><dl><textarea  name="viewsre"  class="history" ob="views" id="pp_views" onblur=clre(this) style="height:20px"><?= $rs['viewsre'] ?></textarea></dl></dd>
    <dd><dl class="title"><span>回复：</span><span id="tip_replies"></span></dl><dl><textarea  name="repliesre"  class="history" ob="replies" id="pp_replies" onblur=clre(this) style="height:20px"><?= $rs['repliesre'] ?></textarea></dl></dd>
    <dd><dl class="title"><span>标签：</span><span id="tip_keywordv"></span></dl><dl><textarea  name="keyword"  class="history" ob="keywordv" id="keyword" id="keywordv" onblur=clre(this) style="height:20px"><?= $rs['keyword'] ?></textarea></dl></dd>
    <dd><dl class="title"><span>作者：</span><span id="tip_author"></span></dl><dl><textarea  name="authorre"  class="history" ob="author" onblur=clre(this) style="height:20px"><?= $rs['authorre'] ?></textarea></dl></dd>
    <dd><dl class="title"><span>记者：</span><span id="tip_jizhe"></span></dl><dl><textarea  name="jizhere"  class="history" ob="jizhe" onblur=clre(this) style="height:20px"><?= $rs['jizhere'] ?></textarea></dl></dd>
    <dd><dl class="title"><span>资源：</span><span id="tip_resources"></span></dl><dl><textarea  name="resourcesre"  class="history" ob="resources" id="pp_resources"
                                  onblur=clre(this) style="height:20px"><?= $rs['resourcesre'] ?></textarea></dl></dd>
    <dd><dl class="title">视图：<span id="tip_aviimage"></span></dl><dl><textarea  name="aviimagere"   class="history" ob="aviimage" onblur=clre(this)><?php $rs['aviimagere']=$rs['aviimagere']??"";echo $rs['aviimagere'];?></textarea></dl></dd>
    <dd><dl class="title">样式：<span id="tip_css"></span></dl><dl><textarea  name="css"  class="history"><?= $rs['css'] ?></textarea></dl></dd>
    <dd><dl class="title">参数：<span id="tip_config"></span><span class="right"><a href="javascript:void()" onclick="help('config')">帮助</a></span></dl><dl><textarea  name="config"><?= $rs['config'] ?></textarea></dl></dd>
    <dd><dl class="title" id="pre_exe">预先执行php（列表页执行php）:<span class="right"><a href="javascript:void()" onclick="help('yszxphp')" id="jsdata_tis">代码集合</a></span><span class="right"><a href="javascript:void()" onclick="zcgj('changeurl')">changeurl</a></span></dl><dl><textarea  ob="preexe" name=preexe  class="history"><?= $rs['preexe'] ?></textarea></dl></dd>
    <dd><dl class="title" id="exe">执行php:<span class="right"><a href="javascript:void()" onclick="help('zxphp')" id="jsdata_tis">代码集合</a></span><span class="right"><a href="javascript:void()" onclick="zcgj('changeurl')">changeurl</a></span></dl><dl><textarea  name=exec id="exec"  class="history"><?= $rs['exec'] ?></textarea></dl></dd>
    <dd><dl class="title" id="after_exe">后执行php(列表处理result）:<span class="right"><a href="javascript:void()" onclick="help('listresultphp')" id="jsdata_tis">代码集合</a></span></dl><dl><textarea  name=listresultphp id="listresultphp"  class="history"><?= $rs['listresultphp'] ?></textarea></dl></dd>
    <dd><dl class="title" id="pre_curl">网址处理:<span class="right"><a href="javascript:void()" onclick="help('changeurlre')" id="curl_tis">changeurlre</a></span></dl><dl><textarea  ob="changeurlre" name=curlfile  class="history"><?= $rs['curlfile'] ?></textarea></dl></dd>
    <dd><dl class="title">视频HTML代码或referer：</dl><dl>
            <textarea name="swfstrreferer" class="history"><?= $rs['swfstrreferer'] ?></textarea></dl></dd>
    <dd><dl class="title">源码预先替换:</dl><dl><textarea  name="pre_delete" onblur=clre(this)
                                      class="history"><?= cn2utf8($rs['pre_delete']) ?></textarea></dl></dd>
    <dd><dl class="title">源码保留:</dl><dl><textarea  name="pre_retant" onblur=clre(this)
                                    class="history"><?= cn2utf8($rs['pre_retant']) ?></textarea></dl></dd>
    <dd><dl class="title" id="delete">结果替换:</dl><dl><textarea  name=delete onblur=clre(this)
                                      class="history"><?= cn2utf8($rs['delete']) ?></textarea></dl></dd>
    <dd><dl class="title">分页图片文件名称:</dl><dl><textarea  name=nextpage><?= $rs['nextpage'] ?></textarea></dl></dd>
    <dd><dl class="title">出现乱码时选:</dl><dl><input class="acharw" name=y value="<?= $rs['y'] ?>">
            &nbsp;<input class="acharw" name="mustformdbpageinfo" value="<?= $rs['mustformdbpageinfo'] ?>"></dl>
                请排版:<input  class="acharw" name=p value="<?= $rs['p'] ?>"></dl></dl></dd>
    <dd><dl class="title">标题链接不能用时:</dl><dl><input class="acharw" name=bturl value="<?= $rs['bturl'] ?>" class="history"></dl></dd>
    <dd><dl class="title" id="puhuo">捕获:<span class="right"><a href=# onclick="puhuo()" target="_blank">测试</a></span><span class="right"><a href="javascript:void()" onclick="help('puhuo')">帮助</a></span></dl><dl><textarea  name=puhuo  class="history"><?= cn2utf8($rs['puhuo']) ?></textarea></dl></dd>
    <dd><dl class="title">HTML获取方式:</dl><dl>
    <select name="getcontenttype">
        <option <? if ($rs['getcontenttype'] == "curl_file_get_contents") echo "selected"; ?>
                value="curl_file_get_contents">curl_file_get_contents
        </option>
        <option <? if ($rs['getcontenttype'] == "file_get_contents") echo "selected"; ?> value="file_get_content">
            file_get_contents
        </option>
        <option <? if ($rs['getcontenttype'] == "curl38") echo "selected"; ?> value="curl38">curl38</option>
        <option <? if ($rs['getcontenttype'] == "curlbase") echo "selected"; ?> value="curlbase">curlbase</option>
        <option <? if ($rs['getcontenttype'] == "Page") echo "selected"; ?> value="Page">Page</option>
    </select></dl></dd>
    <dd><dl class="title">代码里有location时跟进:</dl><input class="acharw" name=locationjump value="<?= $rs['locationjump'] ?>"  class="history"></dd>
    <dd><dl class="title">function:</dl><dl><textarea style="width:98%;height:30px" name="functions" class="history"><?= $rs['functions'] ?></textarea></dl></dd>
    <dd id="cookieWin">
        <dl class="title" id="cookies">
            cookie:
            <span class="right"><input type="checkbox" id="loginsetup">登录设置</input></span>
            <span class="right"><a href="javascript:void(0)" id="getcookie">获取cookie</a></span>
            <span class="right"><a href="dologin://taobao.com/" id="dologin">登陆网站</a></span>
            <span class="right"><a href="javascript:void(0)" id="savecookie">保存cookie</a></span>
        </dl>
        <dl>
            <textarea style="width:98%;height:30px" name="cookie" id="cookie" class="history"><?= $rs['cookie'] ?></textarea>
        </dl>
    </dd>
    <div id="loginsetupdiv" style="display: none">
        <dd><dl class="title">登陆网址:(必填)</dl><dl><input type="text" style="width:98%;height:30px" name="loginurl" id="loginurl" class="history" value="<?= $rs['loginurl'] ?>"></input></dl></dd>
        <dd><dl class="title">登陆按钮/登陆框re:(必填)
                <span class="right"><a href="javascript:void()"  onclick="help('loginbtnre')" class="titleright" id="nrhelp">帮助</a></span>
            </dl><dl><input type="text" style="width:98%;height:30px" name="loginbtn" id="loginbtn" class="history" value="<?= $rs['loginbtn'] ?>"></input></dl></dd>
        <dd><dl class="title">登陆成功re:(必填)</dl><dl><input type="text" style="width:98%;height:30px" name="loginedre" id="loginedre" class="history" value="<?= $rs['loginedre'] ?>"></input></dl></dd>
        <dd><dl class="title">登陆用户名:</dl><dl><input type="text" style="width:98%;height:30px" name="username" id="username" class="history" value="<?= $rs['username'] ?>"></input></dl></dd>
        <dd><dl class="title">登陆密码:</dl><dl><input type="text" style="width:98%;height:30px" name="password" id="password" class="history" value="<?= $rs['password'] ?>"></input></dl></dd>
        <dd><dl class="title">用户名re:</dl><dl><input type="text" style="width:98%;height:30px" name="loginusername" id="loginusername" class="history" value="<?= $rs['loginusername'] ?>"></input></dl></dd>
        <dd><dl class="title">密码re:</dl><dl><input type="text" style="width:98%;height:30px" name="loginpassword" id="loginpassword" class="history" value="<?= $rs['loginpassword'] ?>"></input></dl></dd>
     </div>
    <dd><dl class="title">httpheadoption:</dl><dl><textarea style="width:98%;height:30px" name="httpheadoption" class="history"><?= $rs['httpheadoption'] ?></textarea></dl></dd>
    <dd><dl class="title">python:<span class="right"><a href="javascript:void()" onclick="getpython()" id="python_tis">默认值</a></span></dl><dl><textarea id="python" name="python" class="history"></textarea></dl></dd>
    <dd><dl class="title">flvcd/aviexe:<span class="right"><a href="javascript:void()" onclick="getaviexe()"id="aviexe_tis">默认值</a></span></dl><dl><textarea id="aviexe" name="aviexe" class="history"><?= cn2utf8($rs['aviexe']) ?></textarea></dl></dd>
    <dd><dl class="title"></dl><dl><input type="hidden" name=id value="<?= $rs['id'] ?>"><input type="button" name="b1" value="保存" onclick="submits()" style="width:47px;height:30px"></dl></dd>
    </dt>
</form>
</div>
</body>
</html>
